defmodule ProgContestWeb.SessionController do
  use ProgContestWeb, :controller

  alias ProgContestWeb.Token

  def create(conn, %{"username" => username}) do
    token = Token.sign(username)
    json(conn, %{token: token})
  end
end
